﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContentManage.aspx.cs" Inherits="Content_Admin_ContentManage" StylesheetTheme="ContentMS" Theme="ContentMS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body style="margin:0;" bgcolor="#D8E7FA">
    <form id="form1" runat="server">
    <table  class="TableCss" bgcolor="#D8E7FA" cellSpacing="0" cellpadding="0" width="100%" border="1">		
		<tr>
			<td background="../../Images/HT_top.jpg" colspan="2" height="25">
				<table height="25" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td height="25" valign="middle" align="center">&nbsp;&nbsp;&nbsp;<img src="../../Images/HT_top_ioc.GIF" /></td>
						<td><font class="AdminTitle">&nbsp;&nbsp;<b>内容管理</b></font></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				<asp:GridView ID="ContentView" runat="server" AutoGenerateColumns="False" CssClass="GbText"
					Width="100%" DataKeyNames="ID" CaptionAlign="Left" HorizontalAlign="Left" SkinID="gridviewskin" AllowPaging="True" OnPageIndexChanging="ContentView_PageIndexChanging" OnRowDataBound="ContentView_RowDataBound" OnRowCommand="ContentView_RowCommand" OnRowDeleting="ContentView_RowDeleting" PageSize="20">
					<FooterStyle ForeColor="White" BackColor="#3B6BD1" Font-Bold="True"></FooterStyle>
					<SelectedRowStyle Font-Bold="True" ForeColor="Navy" BackColor="#FFCC66" BorderColor="CornflowerBlue" />
					<RowStyle ForeColor="#333333" BackColor="#FFFBD6" BorderColor="CornflowerBlue" BorderStyle="Solid" BorderWidth="1px" />
					<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" CssClass="GbText" BackColor="#3B6BD1"></HeaderStyle>
					<Columns>						
						<asp:TemplateField HeaderText="标题">
							<ItemTemplate>
								<a href='../../Portal/ViewContent.aspx?ContentID=<%#Eval("ID")%>&CatalogID=<%#Eval("CatalogID") %>' target="_blank"><%# SysOperation.FormatStringLength(Eval("Name").ToString(),SysInfomation.ContentNameLength) %></a>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" />
							<HeaderStyle Width="40%" />							
						</asp:TemplateField>
						<asp:TemplateField  HeaderText="作者">
							<ItemTemplate>
								<%# Eval("UserName")%>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="10%" HorizontalAlign="Center" />
						</asp:TemplateField>
						<asp:TemplateField  HeaderText="类型">
							<ItemTemplate>
								<asp:Image ID="Type" runat="server" ImageUrl='<%# FormatContentType((bool)Eval("Type")) %>' />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="6%" HorizontalAlign="Center" />
						</asp:TemplateField>
						<asp:TemplateField  HeaderText="发表时间">
							<ItemTemplate>
								<%# Eval("CreateDate") %>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="16%" HorizontalAlign="Center" />
						</asp:TemplateField>	
						<asp:TemplateField  HeaderText="状态">
							<ItemTemplate>
								<%# FormatContentState((short)Eval("State"))%>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="10%" HorizontalAlign="Center" />
						</asp:TemplateField>	
						<asp:TemplateField  HeaderText="附件">
							<ItemTemplate>
								<asp:Image ID="Attachment" Visible='<%# FormatImageVisible((short)Eval("dpFlag"))%>' runat="server" ImageUrl='<%# FormatContentdpFlag((short)Eval("dpFlag")) %>' />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="8%" HorizontalAlign="Center" />
						</asp:TemplateField>			
						<asp:TemplateField HeaderText="操作">
							<ItemTemplate>
								<asp:HyperLink ID="EditBtn" Text="修改" Target="ContentDesktop" runat="server" NavigateUrl='<%# "UpdateContent.aspx?ContentID=" + Eval("ID") + "&CatalogID=" + Eval("CatalogID")%>'></asp:HyperLink>&nbsp;&nbsp;&nbsp;
								<asp:ImageButton ID="DeleteBtn" runat="server" CommandName="delete" ImageUrl="~/Images/delete.gif" AlternateText="删除内容" CommandArgument='<%# Eval("ID") %>' />&nbsp;&nbsp;&nbsp;
								</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="10%" HorizontalAlign="Center" />
						</asp:TemplateField>					
					</Columns>
					<AlternatingRowStyle BorderColor="CornflowerBlue" BackColor="White" BorderStyle="Solid" BorderWidth="1px" />
					<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Right" />
					<EditRowStyle BorderColor="CornflowerBlue" BorderWidth="1px" />
				</asp:GridView>
			</td>			
		</tr>
		<tr>
			<td><asp:Button ID="NewContentBtn" runat="server" Text="发表新的内容" Width="100px" CssClass="ButtonCss" OnClick="NewContentBtn_Click" Enabled="False" /><font color="red">(目录结点不能添加内容，只有叶结点能够添加内容。)</font></td>
		</tr>		
    </table>
    </form>
</body>
</html>
